;                          DEEP SPACE AWAKENING
;                            CREATED WITH AGT       
;              TEXT AND GAME COPYRIGHT 1990 BY DECLAN STANLEY
;                           ALL RIGHTS RESERVED
;


;    FLAG INDEX
;
; Flag 1  On  - Door between control room and main link corridor open
;         Off - Door closed
; Flag 2  On  - Talking to baxter
;         Off - Not talking to her
; Flag 3  On  - Equpiment locker open in main link corridor
;         Off - Equpiment locker closed
; Flag 4  On  - Bulkhead airlock one open to section D
;         Off - Closed
; Flag 5  On  - Bulkhead airlock one open to section A
;         Off - Closed
; Flag 6  On  - Bulkhead airlock two open to section A
;         Off - Closed
; Flag 7  On  - Bulkhead airlock two open to section B
;         Off - Closed
; Flag 8  On  - Bulkhead airlock three open to section B
;         Off - Closed
; Flag 9  On  - Bulkhead airlock three open to section C
;         Off - Closed
; Flag 10 On  - Bulkhead airlock four open to section C
;         Off - Closed
; Flag 11 On  - Bulkhead airlock four open to section D
;         Off - Closed
; Flag 12 On  - Player in vacuum
;         Off - Player not in vacuum
; Flag 13 On  - Door from Section C to Cargo holds open
;         Off - Door closed
; Flag 14 On  - Player infected by mold
;         Off - Not infected
; Flag 15 On  - player exited ship by airlock 2
;      15 Off - Player exited ship by airlock 1
; Flag 16 On  - Player goes into space at next turn
;         Off - Player dosen't
; Flag 17 On  - Answered last question correctly
;         Off - Last question's answer incorrect
;

;
;    VARIABLE INDEX
; 
; Variable 1 = number of turns air will be breedable in link corridor
;    "     2 = number of turns door handle has been floating in corridor
;    "     3 = number of location player enters "150" seq. from
;    "     4 = number of times Hyop-Gun has been used
;    "     5 = number of questions answered
;    "     6 =Number of turns player with hostile baxter
;

;    COUNTER INDEX
;
; Counter 1 = Number of turns player has been infected by mold
;

COMMAND DEBUG
  ToggleFlag 0           
  DoneWithTurn
END_COMMAND

; COMMANDS FOR ANY

COMMAND ANY
  NewLife                ; Just starting ?
   TurnFlagOff 12        ; Not in vacuum then
   TurnFlagOff 14        ; Not infected either
   TurnFlagOff 16        ; And should not be blowen into space
END_COMMAND

COMMAND ANY
  AtLocation 3           ; Floating in control room
   NOT FirstVisitToRoom  ; Been, gone and come back
    Chance 23            ; Maybe you should die
     PrintMessage 1      ; You touch a live cable
     KillPlayer          ; and you die
END_COMMAND

COMMAND ANY
  AtLocation 5           ; In main link coridoor centre section
  OR
  AtLocation 6           ; In main link coridoor right end
  OR
  AtLocation 7           ; In main link coridoor left end
   VariableLT 1 3        ; Running out of air ?
    PrintMessage 13      ; Say you are running out of air
END_COMMAND

COMMAND ANY
  AtLocation 5           ; In main link coridoor centre section
  OR
  AtLocation 6           ; In main link coridoor right end
  OR
  AtLocation 7           ; In main link coridoor left end
   SubtractFromVariable 1 1 ; Use up air in coridoor
   VariableEquals 1 0    ; Run out of air ?
    PrintMessage 6       ; Say you run out of air
    KillPlayer           ; And you die
    DoneWithTurn         ; No more
END_COMMAND

COMMAND ANY
  AtLocation 5           ; In main link coridoor
  AddToVariable 2 1      ; Count number of turns in corridor
  VariableEquals 2 4     ; 4 turns in corridor
   InRoom 205            ; And handle is still here
    Destroy 205          ; It floats away
END_COMMAND

COMMAND ANY
  AtLocationGT 40        ; On outside of hull
   AtLocationLT 49       ; And not in escape pod
    Chance 9             ; Then maybe silp
     PrintMessage 71     ; Say you slip
     GotoRoom 56         ; And float away
     DoneWithTurn        ; So stop processing
END_COMMAND

COMMAND ANY
  AtLocationGT 160       ; In moldy Cargo hold
   AtLocationLT 170      ; In moldy Cargo Hold
    FlagOff 14           ; And not infected already
     Chance 12           ; Maybe get infected
     PrintMessage 10     ; Say you brush against some mold
     TurnFlagOn 14       ; Flag as being infected
     TurnCounterOn 1     ; And start count of number of turns
END_COMMAND

COMMAND ANY
  AtLocation 131         ; With Hostile Baxter
   AddToVariable 6 1     ; Count number of turns
   VariableGT 6 3        ; More than 3
    PrintMessage 77      ; Say you are attacked
    KillPlayer           ; And you die
    DoneWithTurn         ; So stop already !
END_COMMAND

COMMAND ANY
 AtLocation 131          ; With hostile baxter
  VerbIsDirection        ; And trying to leave
    PrintMessage 77      ; Say you are attacked
    KillPlayer           ; And you die
    DoneWithTurn         ; So stop
END_COMMAND

COMMAND ANY
  NounIsNumber 240       ; Doing something to mold
   AtLocation 19         ; In Control room
   OR
   AtLocation 9          ; Airlock 4
   OR
   AtLocationGT 130      ; Any Hold
    FlagOff 14           ; Not infected
     PrintMessage 61     ; Say effects of mold
     TurnFlagOn 14       ; Flag as being infected
     TurnCounterOn 1     ; Start count of number of turns
     DoneWithTurn        ; And end processing
END_COMMAND

COMMAND ANY
  FlagOn 14              ; Player infected
   Chance 15             ; Maybe print message
    RandomMessage 48 57  ; Print message
END_COMMAND

COMMAND ANY
    FlagOn 14            ; Player infected
     CounterEquals 1 11  ; For more than 10 turns
      MakeVarRoomNum 3   ; Remember where player was
      GotoRoom 150       ; Then go into terminal dive ("150" seq.)
END_COMMAND

COMMAND ANY
    FlagOn 14            ; Player infected
     CounterEquals 1 26  ; For more than 25 turns
      GotoRoom 159       ; Then get "150" seq. over with
END_COMMAND

COMMAND ANY
  FlagOn 12              ; In vacuum
   NOT IsWearing 260     ; And not wearing Suit
    PrintMessage 75      ; Say you die
    KillPlayer           ; And kill player
    DoneWithTurn         ; Stop processing
END_COMMAND

COMMAND ANY
  FlagOn 16              ; Player to go into space
  PrintMessage 70        ; Say escaping air pushes you away
  GotoRoom 56            ; Then drift off
  DoneWithTurn           ; The End
END_COMMAND

COMMAND ANY
  AtLocationGT 189       ; In "loose Cargo" hold
   AtLocationLT 200      ; In "loose Cargo" Hold
    GotoRandomRoom 190 199 ; Wander randomly around cargo hold
    DoneWithTurn         ; And end
END_COMMAND

; COMMANDS FOR MOVMENT

COMMAND ahead
  AtLocation 5           ; Section C link corridor
   PrintMessage 47       ; Say you go back
   MinusScore 15         ; Remove points
   KillPlayer            ; And kill player
END_COMMAND

COMMAND ahead
  AtLocation 6           ; Outside Airlock 1
   FlagOn 4              ; Airlock door open ?
    PrintMessage 46      ; Say you enter
    GotoRoom 8           ; Enter airlock
    PutInCurrentRoom 236 ; Move airlock controls
    PutInCurrentRoom 237 ; Green Button
    PutInCurrentRoom 238 ; And Red Button into airlock
    DoneWithTurn         ; Then stop
END_COMMAND

COMMAND ahead
  AtLocation 7           ; Outside Airlock 4
   FlagOn 11             ; Airlock open
    PrintMessage 46      ; Say you enter
    GotoRoom 9           ; Enter airlock
    DoneWithTurn         ; And stop
END_COMMAND

COMMAND ahead
  AtLocation 12          ; Section C corridor beside airlock 4
   PrintMessage 32       ; Say you enter room
   GotoRoom 21           ; And goto navagation room
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND ahead
  AtLocation 13          ; Section C corridor mid section
   PrintMessage 11       ; Say jump, move, etc.
   GotoRoom 14           ; And move towards airlock 3
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND ahead
  AtLocation 14          ; Section C corridor airlock 3 end
   PrintMessage 18       ; Say catch hold and pull yourself into airlock
   GotoRoom 10           ; And move into airlock 3
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND ahead
  AtLocation 15          ; Section B
   FlagOn 7              ; Airlock 2 door open
    PrintMessage 18      ; Say catch hold and pull yourself into airlock
    GotoRoom 11          ; And move into airlock 2
    PutInCurrentRoom 236 ; Move airlock controls
    PutInCurrentRoom 237 ; Green Button
    PutInCurrentRoom 238 ; And Red Button into airlock
    DoneWithTurn         ; No more processing
END_COMMAND

COMMAND ahead
  AtLocation 16          ; Section A corridor airlock 2 end
   FlagOn 6              ; Airlock door open
    PrintMessage 18      ; Say catch hold and pull yourself into airlock
    GotoRoom 11          ; And move into Airlock 2
    PutInCurrentRoom 236 ; Move airlock controls
    PutInCurrentRoom 237 ; Green Button
    PutInCurrentRoom 238 ; And Red Button into airlock
    DoneWithTurn         ; No more processing
END_COMMAND

COMMAND ahead
  AtLocation 17          ; Middle of section A lonk corridor
   PrintMessage 40       ; Say you move
   GotoRoom 33           ; Then move
   DoneWithTurn          ; And end
END_COMMAND

COMMAND ahead
  AtLocation 18          ; Section A corridor airlock 1 end
   FlagOn 5              ; Airlock door open
    PrintMessage 18      ; Say catch hold and pull yourself into airlock
    GotoRoom 8           ; And move into Airlock 1
    PutInCurrentRoom 236 ; Move airlock controls
    PutInCurrentRoom 237 ; Green Button
    PutInCurrentRoom 238 ; And Red Button into airlock
    DoneWithTurn         ; No more processing
END_COMMAND

COMMAND ahead
  AtLocation 22          ; Junction 1 main cargo access corridor
   PrintMessage 40       ; Say you move
   GotoRoom 23           ; and move
   DoneWithTurn          ; And end processing
END_COMMAND

COMMAND ahead
  AtLocation 23          ; Junction 2 main cargo access corridor
   PrintMessage 40       ; Say you move
   GotoRoom 25           ; and move
   DoneWithTurn          ; And end processing
END_COMMAND

COMMAND ahead
  AtLocation 24          ; Outside no. 2 cargo hold
   GotoRoom 190          ; Then move
   DoneWithTurn          ; And end processing
END_COMMAND

COMMAND ahead
  AtLocation 26          ; Outside Cargo Hold 1
   PrintMessage 32       ; Say you move
   GotoRoom 180          ; and move
   DoneWithTurn          ; And end processing
END_COMMAND

COMMAND ahead
  AtLocation 28          ; Junction outside observation dome
   PrintMessage 32       ; Say you move
   GotoRoom 32           ; Move into the observation dome
   DoneWithTurn          ; And end processing
END_COMMAND

COMMAND ahead
  AtLocation 29          ; Junction beside entrence to Cargo Hold 3
   PrintMessage 46       ; Say you move
   GotoRoom 170          ; And move
   DoneWithTurn          ; Then end processing
END_COMMAND

COMMAND ahead
  AtLocation 30          ; Junction outside Cargo Hold 4
   PrintMessage 32       ; Say you move
   GotoRoom 160          ; Move into the Cargo Hold
   DoneWithTurn          ; And end processing
END_COMMAND

COMMAND ahead
  AtLocation 160         ; Beside entrence Cargo Hold 4
   PrintMessage 44       ; Say you move
   GotoRoom 161          ; and move
   DoneWithTurn          ; And end processing
END_COMMAND

COMMAND ahead
  AtLocation 166         ; Inside Cargo Hold 4
   PrintMessage 44       ; Say you move
   GotoRoom 168          ; Then move
   DoneWithTurn          ; And end processing
END_COMMAND

COMMAND ahead
  AtLocation 168         ; Inside tunnels in Cargo Hold 4
  GotoRoom 169           ; Move
  DoneWithTurn           ; And end processing
END_COMMAND

COMMAND ahead
  AtLocation 185         ; Middle of Cargo Hold 1 
   PrintMessage 44       ; Say you move
   GotoRoom 186          ; And move
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND ahead
  PrintMessage 9         ; Say they can't
  DoneWithTurn           ; And stop processing
END_COMMAND

COMMAND back
  AtLocation 4           ; At door to deep sleep room
   PrintMessage 38       ; Say jump
   GotoRoom 3            ; And move back into room
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND back
  AtLocation 6           ; In link corridor left end
  OR
  AtLocation 7           ; In link corridor right end
   PrintMessage 12       ; Say jump back to emergency locker door.
   GotoRoom 5            ; And move
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND back
  AtLocation 13          ; At mid point link corridor of section C
   PrintMessage 11       ; Say jump, move, etc.
   GotoRoom 12           ; And move back towards airlock 4
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND back
  AtLocation 14          ; Beside airlock 3 in section C
   PrintMessage 11       ; Say jump, move, etc.
   GotoRoom 13           ; And move back to mid corridor section C
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND back
  AtLocation 15          ; In section B
   PrintMessage 18       ; Say jump, move, etc.
   GotoRoom 10           ; And move back into airlock
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND back
  AtLocation 16          ; In section A beside airlock 2
   PrintMessage 11       ; Say jump, move, etc.
   GotoRoom 17           ; And move into middle section of corridor A
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND back
  AtLocation 18          ; In section A beside airlock 1
   PrintMessage 11       ; Say jump, move, etc.
   GotoRoom 17           ; And move into middle section of corridor A
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND back
  AtLocation 19          ; In main control room
   PrintMessage 32       ; Say you move
   GotoRoom 15           ; And move back into corridor B
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND back
  AtLocation 20          ; In medical bay
   PrintMessage 32       ; Say you move
   GotoRoom 6            ; And move back corridor
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND back
  AtLocation 21          ; Navagation control room
   PrintMessage 32       ; Say you move
   GotoRoom 12           ; Then move
   DoneWithTurn          ; And end processing
END_COMMAND

COMMAND back
  AtLocation 22          ; Junction 1 main cargo access corridor
   PrintMessage 41       ; Say you move
   GotoRoom 13           ; and move
   DoneWithTurn          ; And end processing
END_COMMAND

COMMAND back
  AtLocation 23          ; Junction 2 main cargo access corridor
   PrintMessage 40       ; Say you move
   GotoRoom 22           ; Then move
   DoneWithTurn          ; And end processing
END_COMMAND

COMMAND back
  AtLocation 24          ; Outside no.2 cargo hold
   PrintMessage 38       ; Say you move
   GotoRoom 23           ; Then move
   DoneWithTurn          ; And end processing
END_COMMAND

COMMAND back
  AtLocation 26          ; Outside Cargo Hold 1
   PrintMessage 38       ; Say you move
   GotoRoom 23           ; Then move
   DoneWithTurn          ; And end processing
END_COMMAND

COMMAND back
  AtLocation 29          ; Junction outside cargo hold 3
   PrintMessage 58       ; Say you move
   GotoRoom 22           ; Then move
   DoneWithTurn          ; And end processing
END_COMMAND

COMMAND back
  AtLocation 30          ; Junction outside cargo hold 4
   PrintMessage 58       ; Say you move
   GotoRoom 22           ; Then move
   DoneWithTurn          ; And end processing
END_COMMAND

COMMAND back
  AtLocation 160         ; Beside entrence to Cargo Hold 4
   PrintMessage 45       ; Say you move
   GotoRoom 30           ; Then move
   DoneWithTurn          ; And end processing
END_COMMAND

COMMAND back
  AtLocation 161         ; Inside packing crate tunnel
   PrintMessage 44       ; Say you move
   GotoRoom 160          ; Then move
   DoneWithTurn          ; And end processing
END_COMMAND

COMMAND back
  AtLocation 170         ; Beside door in cargo hold 3
   PrintMessage 45       ; Say you move
   GotoRoom 29           ; Then move
   DoneWithTurn          ; And end processing
END_COMMAND

COMMAND back
  PrintMessage 9         ; Say they can't
  DoneWithTurn           ; And stop processing
END_COMMAND

COMMAND down
  AtLocation 28          ; Outside observation dome
   PrintMessage 83       ; Say you move etc.
END_COMMAND

COMMAND down
  AtLocation 41          ; Handhold junction up from airlock 2
   PrintMessage 73       ; Say you move
   FlagOff 15            ; Should be open 
   GotoRoom 39           ; Goto to open Airlock
   DoneWithTurn          ; End processing
END_COMMAND

COMMAND down
  AtLocation 41          ; Handhold junction up from airlock 2
   FlagOn 15             ; Should be closed
   GotoRoom 53           ; Then goto closed airlock
   DoneWithTurn          ; End processing
END_COMMAND

COMMAND down
  AtLocation 42          ; Handhold junction up from airlock 1
   PrintMessage 73       ; Say you move
   FlagOn  15            ; Should be open 
   GotoRoom 40           ; Goto to open Airlock
   DoneWithTurn          ; End processing
END_COMMAND

COMMAND down
  AtLocation 42          ; Handhold junction up from airlock 1
   FlagOff 15            ; Should be closed
   GotoRoom 54           ; Then goto closed airlock
   DoneWithTurn          ; End processing
END_COMMAND

COMMAND jump airlock
  AtLocation 14          ; Section C corridor airlock 3 end
   PrintMessage 18       ; Say catch hold and pull yourself into airlock
   GotoRoom 10           ; And move into airlock 3
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND jump airlock
  AtLocation 6           ; Section D
   FlagOn 4              ; Airlock 1 door open
    PrintMessage 18      ; Say catch hold and pull yourself into airlock
    GotoRoom 8           ; And move into airlock 1
    PutInCurrentRoom 236 ; Move airlock controls
    PutInCurrentRoom 237 ; Green Button
    PutInCurrentRoom 238 ; And Red Button into airlock
    DoneWithTurn         ; No more processing
END_COMMAND

COMMAND jump airlock
  AtLocation 15          ; Section B
   FlagOn 7              ; Airlock 2 door open
    PrintMessage 18      ; Say catch hold and pull yourself into airlock
    GotoRoom 11          ; And move into airlock 2
    PutInCurrentRoom 236 ; Move airlock controls
    PutInCurrentRoom 237 ; Green Button
    PutInCurrentRoom 238 ; And Red Button into airlock
    DoneWithTurn         ; No more processing
END_COMMAND

COMMAND jump airlock
  AtLocation 16          ; Section A corridor Airlock 2 end
   FlagOn 6              ; Airlock door open
    PrintMessage 18      ; Say catch hold and pull yourself into airlock
    GotoRoom 11          ; And move into Airlock 2
    PutInCurrentRoom 236 ; Move airlock controls
    PutInCurrentRoom 237 ; Green Button
    PutInCurrentRoom 238 ; And Red Button into airlock
    DoneWithTurn         ; No more processing
END_COMMAND

COMMAND jump airlock
  AtLocation 18          ; Section A corridor Airlock 1 end
   FlagOn 5              ; Airlock door open
    PrintMessage 18      ; Say catch hold and pull yourself into airlock
    GotoRoom 8           ; And move into Airlock 1
    PutInCurrentRoom 236 ; Move airlock controls
    PutInCurrentRoom 237 ; Green Button
    PutInCurrentRoom 238 ; And Red Button into airlock
    DoneWithTurn         ; No more processing
END_COMMAND

COMMAND left
  AtLocation 5           ; At mid point of link corridor
   PrintMessage 11       ; Say jump, move, etc.
   GotoRoom 6            ; And move
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND left
  AtLocation 7           ; At mid point of link corridor
   PrintMessage 12       ; Say jump, move, etc.
   GotoRoom 5            ; And move
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND left
  AtLocation 8           ; In Airlock 1
   PrintMessage 31       ; Say you move
   GotoRoom 18           ; And move
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND left
  AtLocation 9           ; In Bulkhead Airlock 4
   FlagOn 11             ; Airlock door open
    PrintMessage 31      ; Say you move out
    GotoRoom 7           ; And move
    DoneWithTurn         ; No more processing
END_COMMAND

COMMAND left
  AtLocation 10          ; In Bulkhead Airlock 3
   PrintMessage 32       ; Say pull yourself out
   GotoRoom 14           ; And move
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND left
  AtLocation 11          ; In Bulkhead Airlock 2
   FlagOn 7              ; Airlock door open to section B
    PrintMessage 32      ; Say pull yourself out
    GotoRoom 15          ; And move
    DoneWithTurn         ; No more processing
END_COMMAND

COMMAND left
  AtLocation 15         ; Section B
   PrintMessage 37      ; Say pull yourself out
   GotoRoom 19          ; And move
   DoneWithTurn         ; No more processing
END_COMMAND

COMMAND left
  AtLocation 17         ; Section A middle section of corridor
   PrintMessage 11      ; Say jump, etc.
   GotoRoom 18          ; And move
   DoneWithTurn         ; No more processing
END_COMMAND

COMMAND left
  AtLocation 22          ; Cargo Access Corridor 
   PrintMessage 58       ; Say move
   GotoRoom 29           ; And move
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND left
  AtLocation 23          ; Cargo Access Corridor junction between 1 and 2 
   PrintMessage 40       ; Say move
   GotoRoom 24           ; And move
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND left
  AtLocation 30          ; Entrence to Cargo hold 4 
   PrintMessage 40       ; Say move
   GotoRoom 27           ; And move
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND left
  AtLocation 41          ; Junction above airlock 2 
   GotoRoom 42           ; And move
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND left
  AtLocation 42          ; Junction above airlock 1 
   GotoRoom 41           ; And move
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND left
  AtLocation 44          ; Junction above airlock 2 
   PrintMessage 73       ; Say move
   GotoRoom 49           ; And move
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND left
  AtLocation 49          ; Junction above airlock 2 
   PrintMessage 75       ; Say move
   GotoRoom 55           ; And move
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND left
  AtLocation 47          ; On "Tpo" of fuel tank
   PrintMessage 73       ; Say move
   GotoRoom 45           ; And move
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND left
   PrintMessage 9        ; Say you can't
   DoneWithTurn          ; And end replies
END_COMMAND

COMMAND right
  AtLocation 5           ; At mid point of link corridor
   PrintMessage 11       ; Say jump, move, etc.
   GotoRoom 7            ; And move
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND right
  AtLocation 6           ; At medical bay end of link corridor
   PrintMessage 32       ; Say you move
   GotoRoom 20           ; And move into medical bay
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND right
  AtLocation 8           ; In airlock 1
   FlagOn 4              ; Door to section_d open
    PrintMessage 31      ; Say you move
    GotoRoom 6           ; And move
    DoneWithTurn         ; Then end
END_COMMAND

COMMAND right
  Atlocation 9           ; In Number 4 airlock
   FlagOn 10             ; And Door to section C open
    PrintMessage 35      ; Say you move, door shorts out, etc.
    GotoRoom 12          ; Move to section C link corridor
    DoneWithTurn         ; And stop
END_COMMAND

COMMAND right
  AtLocation 10          ; In Bulkhead Airlock 3
   PrintMessage 32       ; Say you pull yourself out
   GotoRoom 15           ; And move
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND right
  AtLocation 11          ; In Bulkhead Airlock 2
   FlagOn 6              ; Airlock door open to section A
    PrintMessage 36      ; Say pull yourself out
    GotoRoom 16          ; And move
    DoneWithTurn         ; No more processing
END_COMMAND

COMMAND right
  Atlocation 11          ; In Number 2 Airlock
   FlagOn 6              ; And Door to section A open
    PrintMessage 31      ; Say you move
    GotoRoom 16          ; Move to section A link corridor
    DoneWithTurn         ; And stop
END_COMMAND

COMMAND right
  AtLocation 12          ; Section C corridor beside navagation control
   PrintMessage 11       ; Say jump, move, etc.
   GotoRoom 13           ; And move
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND right
  AtLocation 13          ; Section C corridor beside cargo hold door
   FlagOn 13             ; Door to cargo section open
    PrintMessage 40      ; Say you move
    GotoRoom 22          ; And move
    DoneWithTurn         ; No more processing
END_COMMAND

COMMAND right
  AtLocation 17          ; Section A middle section of corridor 
   PrintMessage 11       ; Say jump, move, etc.
   GotoRoom 16           ; And move
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND right
  AtLocation 22          ; Cargo Access Corridor 
   PrintMessage 58       ; Say move
   GotoRoom 30           ; And move
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND right
  AtLocation 23          ; Cargo Access Corridor junction between 1 and 2 
   PrintMessage 40       ; Say move
   GotoRoom 26           ; And move
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND right
  AtLocation 30          ; Entrence to Cargo hold 4 
   PrintMessage 59       ; Say you move etc.
   GotoRoom 28           ; And move
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND right
  AtLocation 41          ; Junction above airlock 2 
   GotoRoom 42           ; And move
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND right
  AtLocation 42          ; Junction above airlock 1
   GotoRoom 41           ; And move
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND right
  AtLocation 43          ; Junction beside fuel tank
   PrintMessage 73       ; Say move
   GotoRoom 49           ; And move
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND right
  AtLocation 47          ; "Top" of fuel tank 
   PrintMessage 73       ; Say move
   GotoRoom 46           ; And move
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND right
  AtLocation 49          ; Outside escape pod 
   PrintMessage 73       ; Say move
   GotoRoom 44           ; And move
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND right
  AtLocation 182         ; Middle of Cargo Hold 1 
   PrintMessage 44       ; Say you move
   GotoRoom 130          ; And move towards Baxter
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND right
   PrintMessage 9        ; Say you can't go right
   DoneWithTurn          ; No more processing
END_COMMAND

COMMAND UP
  AtLocation 28          ; Outside observation dome
   PrintMessage 83       ; Say you move etc.
END_COMMAND

COMMAND UP
  AtLocation 29          ; Outside cargo hold 3
   PrintMessage 59       ; Say you move etc.
END_COMMAND

COMMAND UP
  AtLocation 25          ; Outside Maintainance control
   Present 258           ; Open door here
    PrintMessage 32      ; Say you move
    GotoRoom 35          ; So move to Maintainance control
    DoneWithTurn         ; And end processing
END_COMMAND


; COMMANDS FOR "CLOSE *"

COMMAND close airlock_1 door
  AtLocation 6           ; At medical bay end of section D
   FlagOn 4              ; And door open
    PrintMessage 39      ; Say door closed
    TurnFlagOff 4        ; and flag as closed
    SwapLocations 218 219 ; Replace open door with closed door
    SwapLocations 222 223 ; Replace open door with closed door
    DoneWithTurn         ; And end
END_COMMAND

COMMAND close airlock_1 door
  AtLocation 18          ; At end of section A
   FlagOn 5              ; And door open
    PrintMessage 39      ; Say door closed
    TurnFlagOff 5        ; and flag as closed
    SwapLocations 251 252 ; Replace open door with closed door
    SwapLocations 220 221 ; Replace open door with closed door
    DoneWithTurn         ; And end
END_COMMAND

COMMAND close airlock_2 door
  AtLocation 16          ; At end of section A
   FlagOn 6              ; And door open
    PrintMessage 39      ; Say door closed
    TurnFlagOff 6        ; and flag as closed
    SwapLocations 210 211 ; Replace open door with closed door
    SwapLocations 234 235 ; Replace open door with closed door
    DoneWithTurn         ; And end
END_COMMAND

COMMAND close airlock_2 door
  AtLocation 15          ; In section B
   FlagOn 7              ; And door open
    PrintMessage 39      ; Say door closed
    TurnFlagOff 7        ; and flag as closed
    SwapLocations 207 208 ; Replace open door with closed door
    SwapLocations 232 233 ; Replace open door with closed door
    DoneWithTurn         ; And end
END_COMMAND

COMMAND close airlock_4 door
  AtLocation 7           ; At armoury end of section D
   FlagOn 11             ; And door open
    PrintMessage 39      ; Say door closed
    TurnFlagOff 11       ; and flag as closed
    SwapLocations 241 242 ; Replace open door with closed door
    SwapLocations 224 225 ; Replace open door with closed door
    DoneWithTurn         ; And end
END_COMMAND


COMMAND close door
  AtLocation 4           ; Beside control room door
   FlagOn 1              ; Door open ?
    Chance 10            ; Maybe an accendent should help
     PrintMessage 5      ; Say handle brakes, you sucked out, etc.
     GotoRoom 5          ; Move to link coridoor
     SetVariableTo 1 5   ; Only gets 5 turns worth of air in corridor
     GetIt 205           ; Now carry handle
     DoneWithTurn        ; No more processing
END_COMMAND

COMMAND close door
  AtLocation 4           ; Beside control room door
   FlagOn 1              ; Door open ?
    PrintMessage 4       ; Say door closed, drift back, etc.
    GotoRoom 3           ; Move back into control room
    TurnFlagOff 1        ; Flag door as closed
    DoneWithTurn         ; No more processing
END_COMMAND

COMMAND close door
  AtLocation 25          ; Outside Maintainance Control
   Present 258           ; Open door here
    PrintMessage 66      ; Say you open door
    SwapLocations 257 258 ; Replace closed Door with open door
    DoneWithTurn         ; And end
END_COMMAND

COMMAND close door with handle
  AtLocation 36          ; Engineering Airlock 2
   Present 205           ; Handle here
    PrintMessage 68      ; Say door closes
    GotoRoom 51          ; And move to airlock with closed door
    DoneWithTurn         ; Stop processing
END_COMMAND

COMMAND close door with handle
  AtLocation 37          ; Engineering Airlock 1
   Present 205           ; Handle here
    PrintMessage 68      ; Say door closes
    GotoRoom 52          ; And move to airlock with closed door
    DoneWithTurn         ; Stop processing
END_COMMAND

COMMAND close door
  AtLocation 36          ; Engineering airlock 2
  OR
  AtLocation 37          ; Engineering airlock 1
   PrintMessage 67       ; Say door won't close
   DoneWithTurn          ; And end
END_COMMAND

COMMAND close section_A door
  Atlocation 8           ; In number 1 airlock
   FlagOn 5              ; Door open to section A
    PrintMessage 25      ; Say you close door
    TurnFlagOff 5        ; Flag door as closed
    SwapLocations 220 221 ; Replace open door with closed door
    SwapLocations 251 252 ; Replace open door with closed door
    DoneWithTurn         ; And stop processing
END_COMMAND

COMMAND close section_A door
  AtLocation 11          ; In number 2 airlock
   FlagOn 6              ; Door open to section A
    PrintMessage 25      ; Say you close door
    TurnFlagOff 6        ; Flag door as closed
    SwapLocations 234 235 ; Replace open door with closed door
    SwapLocations 210 211 ; Replace open door with closed door
    DoneWithTurn         ; And stop processing
END_COMMAND

COMMAND close section_B door
  AtLocation 11          ; In number 2 airlock
   FlagOn 7              ; Door open to section A
    PrintMessage 39      ; Say you close door
    TurnFlagOff 7        ; Flag door as closed
    SwapLocations 232 233 ; Replace open door with closed door
    Swaplocations 207 208 ; Replace door on other side as well
    DoneWithTurn         ; And stop processing
END_COMMAND

COMMAND close section_B door
  AtLocation 9           ; In number 4 airlock
   FlagOn 10             ; Door open to section C
    PrintMessage 39      ; Say you close door
    TurnFlagOff 10       ; Flag door as closed
    SwapLocations 226 227 ; Replace open door with closed door
    DoneWithTurn         ; And stop processing
END_COMMAND

COMMAND close section_D door
  Atlocation 8           ; In number 1 airlock
   FlagOn 4              ; Door open to section D
    PrintMessage 24      ; Say you close door
    TurnFlagOff 4        ; Flag door as closed
    Swaplocations 222 223 ; Replace open door with closed door
    Swaplocations 218 219 ; And close it on the other side as well
    DoneWithTurn         ; And stop processing
END_COMMAND

COMMAND close section_D door
  Atlocation 9           ; In number 4 airlock
   FlagOn 11             ; Door open to section D
    PrintMessage 24      ; Say you close door
    TurnFlagOff 11       ; Flag door as closed
    Swaplocations 224 225 ; Replace open door with closed door
    Swaplocations 241 242 ; And close it on the other side as well
    DoneWithTurn         ; And stop processing
END_COMMAND

;  COMMANDS TO SCORE HELP MASSAGES

COMMAND HELP
  AtLocation 164         ; In moldy cargo hold
   PlusScore 20          ; Add to score for getting info.
END_COMMAND

COMMAND HELP
  AtLocation 32          ; In forward observation dome
   PlusScore 20          ; Add to score for getting info.
END_COMMAND

; COMMANDS FOR TALKING TO BAXTER

COMMAND ANY
  NounIsNumber 264     ; Doing something to Baxter
   FlagOn 2              ; Started conversation
    PrintMessage 78      ; She asks about water
    TurnFlagOff 17       ; Flag as incorrect answer
    AskQuestion 2        ; Ask and answer
    AnswerIsCorrect      ; No you don't
    TurnFlagOn 17        ; Flag as correct answer
    PlusScore 10         ; Good player you so are rewarded
    PrintMessage 79      ; She wouldn't expect you to have any
    DoneWithTurn         ; And stop
END_COMMAND

COMMAND ANY
  NounIsNumber 264       ; Doing something to Baxter
   FlagOn 2              ; Started conversation
   FlagOff 17            ; Wrong answer
    PrintMessage 82      ; Say she dies
    TurnFlagOn 14        ; But you got infected anyway
    GotoRoom 131         ; And goto dead Baxter
    DoneWithTurn         ; End
END_COMMAND

COMMAND wait
  AtLocation 133         ; With drugged Baxter
   FlagOn 2              ; Started conversation
    PrintMessage 80      ; She talks about 
    AskQuestion 3        ; Will it be a better world
    AnswerIsCorrect      ; Player thinks so
     PrintMessage 81     ; She dies
     PlusScore 30        ; Good Player for helping to ease her death
     TurnFlagOn 14       ; But you got infected anyway
     GotoRoom 131        ; Goto dead Baxter
     DoneWithTurn        ; And stop
END_COMMAND

COMMAND ex ANY
  NounIsNUmber 264       ; Ex Baxter
   AtLocation 133        ; With drugged Baxter
    FlagOff 2            ; Not started conversation Already
     PrintMessage 76     ; Say she starts to speak
     TurnFlagOn 2        ; And flag conversation has started
     TurnFlagOff 17      ; Flag as incorrect answer
     AskQuestion 1       ; She asks if you are john.
     AnswerIsCorrect     ; You say yes
      TurnFlagOn 17      ; Flag as correct answer
      PlusScore 10       ; Good Player so are rewarded
      DoneWithTurn       ; Stop processing
END_COMMAND

; COMMANDS FOR USING HYPO-GUN

COMMAND inject ANY
  NOT Present 246        ; Hypo gun not here
   PrintMessage 60       ; Say can't use if don't have
   DoneWithTurn          ; End Processing
END_COMMAND

COMMAND inject ANY
  AddToVariable 4 1      ; Used one more time
  VariableGT 4 5         ; Drug all used up ?
   PrintMessage 65       ; Say Dosen't inject
   DoneWithTurn          ; And stop
END_COMMAND

COMMAND inject me
  FlagOff 14             ; Not infected
   PrintMessage 62       ; Say effects of drug
   PrintMessage 63       ; And expalin that as you weren't infected ...
   KillPlayer            ; You die
   DoneWithTurn          ; That's all folks
END_COMMAND

COMMAND inject me
  FlagOn 14              ; Player infected
   AtLocationGT 149      ; In "150" seq. 
    AtLocationLT 159     ; In "150" seq. 
     GotoVariableRoom 3  ; Then back to where you started from
END_COMMAND

COMMAND inject me
  FlagOn 14              ; Player infected
   PrintMessage 62       ; Say effects of drug
   TurnCounterOff 1      ; Zero infected count 
   TurnCounterOn 1       ; And start count again
   DoneWithTurn          ; End processing
END_COMMAND

COMMAND inject ANY
  NounIsNumber 264       ; Injecting baxter
   Present 264           ; Baxter here
    PrintMessage 64      ; Say effects on Baxter
    SendToRoom 254 131   ; Put dead Baxter here
    GotoRoom 133         ; Move to non hostile baxter
    SendToRoom 264 133   ; Put baxter in room as well
    DoneWithTurn         ; And end
END_COMMAND


; COMMANDS FOR "OPEN *"

COMMAND open airlock_1 door
  AtLocation 6           ; Medical bay end of link corridor
   FlagOff 4             ; Airlock door closed
    PrintMessage 17      ; Say door open
    SwapLocations 218 219 ; Replace closed door with open door
    SwapLocations 222 223 ; Replace door on other side
    TurnFlagOn 4         ; Flag airlock as open
    DoneWithTurn         ; And stop processing
END_COMMAND

COMMAND open airlock_1 door
  AtLocation 18          ; In section A
   FlagOff 5             ; Airlock door closed
    PrintMessage 17      ; Say door open
    SwapLocations 220 221 ; Replace closed door with open door
    SwapLocations 251 252 ; Replace door on other side
    TurnFlagOn 5         ; Flag airlock as open
    DoneWithTurn         ; And stop processing
END_COMMAND

COMMAND open airlock_2 door
  AtLocation 15          ; Section B
   FlagOff 7             ; Airlock door closed
    PrintMessage 17      ; Say door open
    SwapLocations 207 208 ; Replace closed door with open door
    SwapLocations 232 233 ; Replace door on other side as well
    TurnFlagOn 7         ; Flag airlock as open to section B
    DoneWithTurn         ; And stop processing
END_COMMAND

COMMAND open airlock_2 door
  AtLocation 16          ; In section A
   FlagOff 6             ; Airlock door closed
    PrintMessage 17      ; Say door open
    SwapLocations 234 235 ; Replace closed door with open door
    SwapLocations 210 211 ; Replace closed door on other side
    TurnFlagOn 6         ; Flag airlock as open to section A
    DoneWithTurn         ; And stop processing
END_COMMAND

COMMAND open airlock_4 door
  AtLocation 7           ; Armury end of section D of link corridor
   FlagOff 11            ; Airlock door closed
    PrintMessage 17      ; Say door open
    SwapLocations 241 242 ; Replace closed door with open door
    Swaplocations 224 225 ; Replace door on other side as well
    TurnFlagOn 11        ; Flag airlock as open
    DoneWithTurn         ; And stop processing
END_COMMAND

COMMAND open door
  AtLocation 4           ; Beside control room door on inside
   FlagOn 1              ; Door open ?
    PrintMessage 3       ; Say door opening, you float out, etc.
    GotoRoom 5           ; Move to link coridoor
    SetVariableTo 1 10   ; 10 turns worth of air in corridor
    DoneWithTurn         ; No more processing
END_COMMAND

COMMAND open door
  AtLocation 4           ; Beside control room door on inside
   FlagOff 1             ; Door closed then
    PrintMessage 2       ; Say door opening, air escaping, etc.
    TurnFlagOn 1         ; Flag door as open
    DoneWithTurn         ; No more processing
END_COMMAND

COMMAND open door with handle
  AtLocation 13          ; Beside door to Cargo Holds
   Present 205           ; Handle is present
    FlagOff 13           ; Door closed
     PrintMessage 43     ; Say you open door
     TurnFlagOn 13       ; Flag door as open
     SwapLocations 250 253 ; Replace closed door with open door
     DoneWithTurn        ; And end
END_COMMAND

COMMAND open door
  AtLocation 13          ; Beside door to Cargo Holds
   FlagOff 13            ; Door closed
    PrintMessage 42      ; Say nothing happens
    DoneWithTurn         ; No more processing
END_COMMAND

COMMAND open section_A door
  Atlocation 8           ; In number 1 airlock
   FlagOff 5             ; Door closed to section A
    FlagOff 4            ; Both doors closed
     FlagOn 12           ; And in vacuum
      PrintMessage 27    ; Say you open door
      TurnFlagOff 5      ; Flag door as open
      Swaplocations 220 221 ; Replace closed door with open door
      Swaplocations 251 252 ; Replace closed door on other side
      DoneWithTurn       ; And stop processing
END_COMMAND

COMMAND open section_A door
  Atlocation 11          ; In number 2 airlock
   FlagOff 6             ; Door closed to section A
    FlagOff 7            ; Both doors closed
     FlagOn 12           ; And in vacuum
      PrintMessage 27    ; Say you open door
      TurnFlagOn  6      ; Flag door as open
      Swaplocations 234 235 ; Replace closed door with open door
      Swaplocations 210 211 ; Replace closed door on other side as well
      DoneWithTurn       ; And stop processing
END_COMMAND

COMMAND open section_A door
  AtLocation 8           ; In number 1 Airlock
  OR
  AtLocation 11          ; In number 2 airlock
   FlagOff 12            ; And not in vacuum
    PrintMessage 30      ; Say can't open to vacuum when pressurised
    DoneWithTurn         ; And stop processing
END_COMMAND

COMMAND open section_B door
  Atlocation 11          ; In number 2 airlock
   FlagOff 7             ; Door closed to section B
    FlagOff 6            ; Both doors closed
     PrintMessage 26     ; Say you open door
     TurnFlagOn 7        ; Flag door as open
     Swaplocations 232 233 ; Replace closed door with open door
     Swaplocations 207 208 ; Replace door on other side as well
     DoneWithTurn        ; And stop processing
END_COMMAND

COMMAND open section_C door
  AtLocation 9           ; In number 4 airlock
   FlagOff 10            ; And door to section C closed
    FlagOff 11           ; Both doors closed
     FirstVisitToRoom    ; Not been here before
      TurnFlagOn 10      ; Flag door as being open
      SwapLocations 226 227 ; Replace closed door with open door
      PrintMessage 34    ; Say door opens
      DoneWithTurn       ; and stop processing
END_COMMAND

COMMAND open section_D door
  Atlocation 8           ; In number 1 airlock
   FlagOff 4             ; Door closed to section D
    FlagOff 5            ; Both doors closed
     PrintMessage 26     ; Say you open door
     TurnFlagOn 4        ; Flag door as open
     Swaplocations 222 223 ; Replace closed door with open door
     Swaplocations 219 248 ; And close it on the other side as well
     DoneWithTurn        ; And stop processing
END_COMMAND

COMMAND open section_D door
  Atlocation 9           ; In number 4 airlock
   FlagOff 11            ; Door closed to section D
    FlagOff 10           ; Both doors closed
     PrintMessage 26     ; Say you open door
     TurnFlagOn 11       ; Flag door as open
     Swaplocations 224 225 ; Replace closed door with open door
     Swaplocations 241 242 ; And open it on the other side as well
     DoneWithTurn        ; And stop processing
END_COMMAND

COMMAND open door
   AtLocation 9          ; In number 4 airlock
   OR
   AtLocation 11         ; In number 2 airlock
   OR
   AtLocation 8          ; In number 1 airlock
    PrintMessage 8       ; Say can't have both open
    DoneWithTurn         ; And end
END_COMMAND

COMMAND open door
  AtLocation 25          ; Outside Maintainance Control
   Present 257           ; Closed Door here
    PrintMessage 33      ; Say you open door
    SwapLocations 257 258 ; Replace closed Door with open door
    DoneWithTurn         ; And end
END_COMMAND

COMMAND open door
  AtLocation 36          ; Engineering airlock 2
  Or
  AtLocation 57          ; Airlock 2 with outer door open
   PrintMessage 69       ; Say door opens
   TurnFlagOn 12         ; Flag as being in vacuum
   GotoRoom 59           ; Goto airlock with both doors open
   TurnFlagOn 16         ; And flag to be blowen out into space
   DoneWithTurn          ; End processing
END_COMMAND

COMMAND open door
  AtLocation 37          ; Engineering airlock 1
  Or
  AtLocation 58          ; Airlock 1 with outer door open
   PrintMessage 69       ; Say door opens
   TurnFlagOn 12         ; Flag as being in vacuum
   GotoRoom 60           ; Goto airlock with both doors open
   TurnFlagOn 16         ; And flag to be blowen out into space
   DoneWithTurn          ; End processing
END_COMMAND

COMMAND open door with handle
  AtLocation 51          ; Engineering Airlock 2 (both doors closed)
   Present 205           ; Handle here
    PrintMessage 72      ; Say door opens
    MinusScore 15        ; Should try controls first
    TurnFlagOn 12        ; Flag as being in vacuum
    GotoRoom 57          ; Goto airlock with outer door open
    DoneWithTurn         ; And end
END_COMMAND

COMMAND open door
  AtLocation 51          ; Engeering airlock 2
   PrintMessage 69       ; Say door opens
   TurnFlagOn 12         ; Flag as being in vacuum
   GotoRoom 57           ; Goto airlock with outer door open
   DoneWithTurn          ; And end
END_COMMAND

COMMAND open door with handle
  AtLocation 52          ; Engineering Airlock 1 (both doors closed)
   Present 205           ; Handle here
    PrintMessage 7       ; Say door opens
    MinusScore 15        ; Should try controls first
    TurnFlagOn 12        ; Flag as being in vacuum
    GotoRoom 58          ; Goto airlock with outer door open
    DoneWithTurn         ; And end
END_COMMAND

COMMAND open door
  AtLocation 52          ; Engeering airlock 1
   PrintMessage 69       ; Say door opens
   TurnFlagOn 12         ; Flag as being in vacuum
   GotoRoom 58           ; Goto airlock with outer door open
   TurnFlagOn 15         ; Flag As leaving ship through airlock 1
   DoneWithTurn          ; And end
END_COMMAND

COMMAND open door with handle
  AtLocation 53          ; Outside Engineering Airlock 2 (door closed)
   Present 205           ; Handle here
    PrintMessage 72      ; Say door opens
    GotoRoom 39          ; Goto airlock with outer door open
    DoneWithTurn         ; And end
END_COMMAND

COMMAND open door
  AtLocation 53          ; Outside Engineering airlock 2 (Door closed)
   PrintMessage 74       ; Say door does not open
   TurnFlagOn 16         ; Flag to be blowen away
   DoneWithTurn          ; And end
END_COMMAND

COMMAND open door with handle
  AtLocation 54          ; Outside Engineering Airlock 1 (door closed)
   Present 205           ; Handle here
    PrintMessage 72      ; Say door opens
    GotoRoom 40          ; Goto airlock with outer door open
    TurnFlagOn 16        ; Flag to be blowen away
    DoneWithTurn         ; And end
END_COMMAND

COMMAND open door
  AtLocation 54          ; Outside Engineering airlock 1 (Door closed)
   PrintMessage 74       ; Say door does not open
   DoneWithTurn          ; And end
END_COMMAND

COMMAND open door
   PrintMessage 29       ; Say do not understand
   DoneWithTurn          ; And end
END_COMMAND

; COMMANDS FOR "OPEN LOCKER"

COMMAND open locker with handle
  AtLocation 5           ; In middle of link corridor
   IsCarrying 205        ; Has manual handle
    FlagOff 3            ; Door closed ?
     PrintMessage 14     ; Say opening door
     TurnFlagOn 3        ; Flag locker as being open
     SwapLocations 212 214 ; Replace closed locker with open locker
     PutInCurrentRoom 215 ; Put emergency survivle suit in room
     DoneWithTurn        ; And end processing
END_COMMAND

COMMAND open locker
  AtLocation 5           ; In middle of link corridor
   PrintMessage 15       ; Say can not open door
   DoneWithTurn          ; And end processing
END_COMMAND

; COMMANDS FOR "push *"

COMMAND push button
  NounIsNumber 237       ; Green button
   FlagOff 12            ; Air pressure normal ?
    PrintMessage 19      ; Say air pressure normal already
    DoneWithTurn         ; And stop processing
END_COMMAND

COMMAND push button
  NounIsNumber 237       ; Green button
   AtLocation 8          ; In number 1 airlock
    FlagOn 4             ; Airlock open to section D
    OR
    FlagOn 5             ; Airlock open to section A
     PrintMessage 21     ; Say will not work with door open
     DoneWithTurn        ; End processing
END_COMMAND

COMMAND push button
  NounIsNumber 237       ; Green button
   AtLocation 8          ; In number 1 airlock
    FlagOff 4            ; Airlock closed to section D
     FlagOff 5           ; Airlock closed to section A
      PrintMessage 23    ; Say air beeing blown in
      TurnFlagOff 12     ; Flag as not being in vacuum any more
      DoneWithTurn       ; End processing
END_COMMAND

COMMAND push green button
  NounIsNumber 237       ; Green button
   AtLocation 11         ; In number 2 airlock
    FlagOn 6             ; Airlock open to section A
    OR
    FlagOn 7             ; Airlock open to section B
     PrintMessage 21     ; Say will not work with door open
     DoneWithTurn        ; End processing
END_COMMAND

COMMAND push button
  NounIsNumber 237       ; Green button
   AtLocation 11         ; In number 2 airlock
    FlagOff 6            ; Airlock closed to section A
     FlagOff 7           ; Airlock closed to section B
      PrintMessage 23    ; Say air beeing blown in
      TurnFlagOff 12     ; Flag as not being in vacuum any more
      DoneWithTurn       ; End processing
END_COMMAND

COMMAND push button
  NounIsNumber 238       ; Red button
   FlagOn 12             ; In vacuum already
    AtLocation 8         ; In number 1 airlock
    OR
    AtLocation 11        ; In number 2 airlock
     PrintMessage 20     ; Say in vacuum
     DoneWithTurn        ; And end processing
END_COMMAND

COMMAND push button
  NounIsNumber 238       ; Red button
   AtLocation 8          ; In number 1 airlock
    FlagOn 4             ; Airlock open to section D
    OR
    FlagOn 5             ; Airlock open to section A
     PrintMessage 21     ; Say will not work with door open
     DoneWithTurn        ; End processing
END_COMMAND

COMMAND push button
  NounIsNumber 238       ; Red button
   AtLocation 8          ; In number 1 airlock
    FlagOff 4            ; Airlock closed to section D
     FlagOff 5           ; Airlock closed to section A
      PrintMessage 22    ; Say air beening sucked out
      TurnFlagOn 12      ; Flag as being in vacuum now
      DoneWithTurn       ; End processing
END_COMMAND

COMMAND push button
  NounIsNumber 238       ; Red button
   AtLocation 11         ; In number 2 airlock
    FlagOn 6             ; Airlock open to section A
    OR
    FlagOn 7             ; Airlock open to section B
     PrintMessage 21     ; Say will not work with door open
     DoneWithTurn        ; End processing
END_COMMAND

COMMAND push button
  NounIsNumber 238       ; Red button
   AtLocation 11         ; In number 2 airlock
    FlagOff 6            ; Airlock closed to section A
     FlagOff 7           ; Airlock closed to section B
      PrintMessage 22    ; Say air beening sucked out
      TurnFlagOn 12      ; Flag as being in vacuum now
      DoneWithTurn       ; End processing
END_COMMAND

; COMMANDS FOR "TAKE *"

COMMAND take ANY
  PrintMessage 16        ; Say you put it in your tool belt.
END_COMMAND

; COMMANDS FOR "TURN HANDLE"

COMMAND turn handle
  AtLocation 4           ; Beside control room door on inside
   FlagOn 1              ; Door open ?
    PrintMessage 3       ; Say door opening, you float out, etc.
    GotoRoom 5           ; Move to link coridoor
    SetVariableTo 1 10   ; 10 turns worth of air in corridor
    DoneWithTurn         ; No more processing
END_COMMAND

COMMAND turn handle
  AtLocation 4           ; Beside control room door on inside
   FlagOff 1             ; Door closed then
    PrintMessage 2       ; Say door opening, air escaping, etc.
    TurnFlagOn 1         ; Flag door as open
    DoneWithTurn         ; No more processing
END_COMMAND

; MIS. / ONE-OFF COMMANDS

COMMAND float ANY
  PrintMessage 7         ; Say you are floating already
  DoneWithTurn           ; No more processing
END_COMMAND



